package com.szt.sy.entity.base;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.Version;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;

/***
 * 实体基类，id生成方式为uuid方式
 *
 * @author wwy
 *
 */
public abstract class BaseUuidEntity implements Serializable {
	
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	
	/***
	 * id
	 */
	@TableId(value = "ID", type = IdType.UUID)
	private String id;
	
	/***
	 * 版本号，暂时没用
	 */
	@Version
	@TableField(fill = FieldFill.INSERT)
	private Long version;
	
	/***
	 * 添加时间
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date addDate;
	
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public Long getVersion() {
		return version;
	}
	
	public void setVersion(Long version) {
		this.version = version;
	}
	
	public Date getAddDate() {
		return addDate;
	}
	
	public void setAddDate(Date addDate) {
		this.addDate = addDate;
	}
	
}
